package com.hakim.wfb.common.enums;

/**
 * 用户投资状态
 */
public enum UserInvestStatusEnum {

    NOT_INVEST(0, "未投"),
    INVESTING(1, "在投");

    private int value;
    private String description;

    private UserInvestStatusEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static UserInvestStatusEnum getByValue(int value) {
        UserInvestStatusEnum[] codes = values();
        for (UserInvestStatusEnum each : codes) {
            if (each.value == value) {
                return each;
            }
        }
        return null;
    }
}
